package guava.maps;

import com.google.common.collect.MapDifference;
import com.google.common.collect.Maps;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by User on 2017/12/12.
 */
public class App {
    public static void main(String[] args) {

        String keyword = "衬衫男  长袖 asda";

        String[] split = keyword.split(" +");
        for (String s : split)
            System.out.println(s);


        Map map1 = new HashMap();
        map1.put("1", "1");
        map1.put("2", "2");
        map1.put("3213", "2133");
        map1.put("4", "4");
        map1.put("213", "1231");
        Map map2 = new HashMap();
        map2.put("1", "1");
        map2.put("2", "2");
        map2.put("4", "4");
        map2.put("213", "1231");


        MapDifference difference = Maps.difference(map1, map2);

        Map map = difference.entriesDiffering();
        Map map3 = difference.entriesInCommon();
        Map map4 = difference.entriesOnlyOnLeft();
        Map map5 = difference.entriesOnlyOnRight();
        System.out.println(map3);
    }
}
